package com.qnbc.mystery.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.qnbc.mystery.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 【请填写功能名称】对象 cart
 *
 * @author guzj
 * @date 2023-12-27
 */

@Setter
@Getter
@Data
public class Cart implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商品id
     */
    private String productId;

    /**
     * 商品规格id
     */
    private String productDetialId;

    /**
     * 用户 id
     */
    private String userId;

    /**
     * 数量
     */
    private Integer num;


    @TableField(exist = false)
    private String userName;

    @TableField(exist = false)
    private String name;

    //商品规格名称
    @TableField(exist = false)
    private String detialName;
    //商品规格名称
    @TableField(exist = false)
    private String detialImage;

    @TableField(exist = false)
    private String propic;

    @TableField(exist = false)
    private BigDecimal price;

    @TableField(exist = false)
    private int stock;

    @TableField(exist = false)
    private BigDecimal discountNum;

    /**
     * 商品价格
     */
    @TableField(exist = false)
    private BigDecimal discountPrice;


    /**
     * 购物车类型  1 商品  2 一番赏 3 魔力赏
     */
    private int cartType;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    private String createdBy;

    /**
     * 更新人
     */
    @Excel(name = "更新人")
    private String updatedBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /**
     * 创建日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;


    /**
     * 订单号
     */
    @ApiModelProperty("订单号")
    @Excel(name = "订单号")
    private String orderNo;

}
